package me.zhengjie.modules.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.app.domain.GameRecords;
import me.zhengjie.modules.app.domain.GameRounds;
import me.zhengjie.modules.app.mapper.GameRecordsMapper;
import me.zhengjie.modules.app.mapper.GameRoundsMapper;
import me.zhengjie.modules.app.service.GameRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.beans.Transient;
import java.util.Date;
import java.util.UUID;

/**
* @author xz
* @date 2025/06/23
*/
@Slf4j
@Service
public class GameRecordsServiceImpl extends ServiceImpl<GameRecordsMapper, GameRecords> implements GameRecordsService {

    @Autowired
    private GameRoundsMapper gameRoundsMapper;
    /**
     * 新增记录
     * @param dataModel
     * @return
     */
    @Transient
    @Override
    public int insertData(GameRecords dataModel){
        Date insertDate=new Date();
        dataModel.setCreateTime(insertDate);
        dataModel.setUpdateTime(insertDate);
        return getBaseMapper().insert(dataModel);
    }
}
